import React from 'react'

interface PersonProps {
  name: string;
  content? : React.ReactNode;//jsx类型
}
function Person(props: PersonProps) {
  return (
    <div>
      <h3>你好我是 {props.name}</h3>
      {props.content}
    </div>
  )
}

const Animal : React.FC <PersonProps>= (props) => {
  return (
    <div>
      <h3>动物 {props.name}</h3>
    </div>
  )
}
function App() {
  return (
    <div>
      <h1>Hello TS</h1>
      <Person name="张三" content = {<button>提交</button>} />
      <Animal name="老虎" />
    </div>
  )
}
export default App